package Model;

import java.io.IOException;

import com.btcode.common.MyLog;
import com.btcode.common.PropertiesUnit;
import com.btcode.db.executer.IDataExecuter;
import com.btcode.db.executer.MySQLDataExecuter;
import com.btcode.orm.model.generater.MySQLGenerater;
import com.btcode.orm.model.generater.SQLLetGenerater;
import com.hrt.datasender.web.WebMain;
import com.hrt.db.DBManager;


public class ModelGeneraer {
	
	public static void main(String[] args) throws IOException{
		WebMain.DBTYPE="mysql";
        PropertiesUnit.setPropertiesPath("C:\\workspace_IDEA\\DataSenderV2\\resource\\conf.properties");
        String logPath = PropertiesUnit.getValue("logPath");
        MyLog.getInstance().setRootPath(logPath);
		generateModel();
	}

	public static void generateModel() throws IOException{
		IDataExecuter dataExecuter = DBManager.getDataExecuter();

		MySQLGenerater generater = new MySQLGenerater(dataExecuter);
		generater.generaterFile("Model", "BD_PLC_ALARM","C:\\workspace_IDEA\\DataSenderV2\\src\\test\\Model");
	}

}
